/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.gateway.dianlan.protocol.active;

import info.peigen.hotpot.component.gateway.dianlan.annotations.DianlanProtocol;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

import static info.peigen.hotpot.component.gateway.dianlan.annotations.DianlanProtocol.DianlanProtocolDataType.BCD;

/**
 * <b>(DianlanRemoteStopCharge)</b>
 * <p>
 * 远程控制停机
 * 当客户通过远程停止充电时，发送本命令，如 APP 停止充电
 * 帧类型码 0x36
 * 序列号域 0003
 * 数据长度 0C(12)
 * 帧校验域 4622
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2022/8/11
 */
@SuperBuilder
@Data
@NoArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class DianlanRemoteStopCharge {
    /** 桩编码 */
    @DianlanProtocol(length = 7, start = 0, end = 7, dataType = BCD)
    String stubNo;
    /** 充电枪号 */
    @Builder.Default
    @DianlanProtocol(length = 1, start = 7, end = 8, dataType = BCD)
    String chargingPortNo = "01";
}